package owl2vowl.parser.vowl.property;

import owl2vowl.model.data.VowlData;
import owl2vowl.model.entities.AbstractEntity;
import owl2vowl.model.entities.nodes.classes.VowlClass;
import owl2vowl.model.entities.nodes.classes.VowlThing;
import owl2vowl.model.entities.nodes.datatypes.VowlDatatype;
import owl2vowl.model.entities.nodes.datatypes.VowlLiteral;
import owl2vowl.model.entities.properties.TypeOfProperty;
import owl2vowl.model.entities.properties.VowlDatatypeProperty;
import owl2vowl.model.entities.properties.VowlObjectProperty;
import owl2vowl.model.individuals.VowlIndividual;
import owl2vowl.model.visitor.VowlElementVisitor;
import java.util.HashSet;
import java.util.Iterator;
import org.semanticweb.owlapi.model.IRI;

public class VowlSubclassPropertyGenerator implements VowlElementVisitor {
	private VowlData vowlData;

	public VowlSubclassPropertyGenerator(VowlData vowlData) {
		this.vowlData = vowlData;
	}

	public void execute() {
		HashSet entities = new HashSet(this.vowlData.getEntityMap().values());
		Iterator arg1 = entities.iterator();

		while (arg1.hasNext()) {
			AbstractEntity abstractEntity = (AbstractEntity) arg1.next();
			abstractEntity.accept(this);
		}

	}

	public void visit(VowlThing vowlThing) {
	}

	public void visit(VowlClass vowlClass) {
		if (vowlClass.getSubEntities().size() != 0) {
			Iterator arg1 = vowlClass.getSubEntities().iterator();

			while (arg1.hasNext()) {
				IRI iri = (IRI) arg1.next();
				this.vowlData.getGenerator().generateSubclassProperty(iri, vowlClass.getIri());
			}
		}

	}

	public void visit(VowlLiteral vowlLiteral) {
	}

	public void visit(VowlDatatype vowlDatatype) {
	}

	public void visit(VowlObjectProperty vowlObjectProperty) {
	}

	public void visit(VowlDatatypeProperty vowlDatatypeProperty) {
	}

	public void visit(VowlIndividual vowlIndividual) {
	}

	public void visit(TypeOfProperty typeOfProperty) {
	}
}